package bda.model;

import java.util.Date;
import java.util.List;


public class Billet {

	protected Date dateVoyage;
	protected int nbPlaceReserves;
	protected double prix;
	protected List<Passager> passagers;
	protected Trajet trajet;
	protected static double prixKm = 0.08;
	
	
	public Billet(){
		
	}
	public Date getDateVoyage() {
		return dateVoyage;
	}
	public void setDateVoyage(Date dateVoyage) {
		this.dateVoyage = dateVoyage;
	}
	public int getNbPlaceReserves() {
		return nbPlaceReserves;
	}
	public void setNbPlaceReserves(int nbPlace) {
		this.nbPlaceReserves = nbPlace;
	}
	public double getPrix() {
		return prix;
	}
	public void setPrix(double prix) {
		this.prix = prix;
	}
	public List<Passager> getPassagers() {
		return passagers;
	}
	public void setPassagers(List<Passager> passagers) {
		this.passagers = passagers;
	}
	public Trajet getTrajet() {
		return trajet;
	}
	
	
	/**
	 * @param trajet
	 */
	public void setTrajet(Trajet trajet) {
		this.trajet = trajet;
	}
	/**
	 * @return
	 */
	public String getDepartureCity(){
		return this.trajet.getVilleDepart();
	}
	
	public void calculPrix(){
		prix = this.trajet.getDistanceParcours()*prixKm * nbPlaceReserves;
	}
	
	
}
